package cn.outsourcing.supermarket.mapper;

import cn.outsourcing.supermarket.po.HiolabsProduct;
import cn.outsourcing.supermarket.provider.OrderGoodsProvider;
import cn.outsourcing.supermarket.vo.ProductSpecificationVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * Mapper 接口
 *
 * @author gzkemays
 * @since 2021-10-22
 */
public interface HiolabsProductMapper extends BaseMapper<HiolabsProduct> {
  /**
   * 根据商品 id 获取规格以及产品信息
   *
   * @param goodsIds 商品id
   * @return 整合信息
   */
  @SelectProvider(value = OrderGoodsProvider.class, method = "getProductSpecificationByGoodsId")
  List<ProductSpecificationVO> getProductSpecificationByGoodsId(
      @Param(value = "goodsIds") String goodsIds);
}
